package com.kongxiang.cubebit.llm.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

@Data
@Schema(description = "重排序请求")
public class ReRankRequest {

    @NotNull(message = "模型名称不能为空")
    @Schema(description = "模型名称", example = "BAAI/bge-reranker-v2-m3")
    private String model;

    @NotNull(message = "查询条件不能为空")
    @Schema(description = "查询条件", example = "Apple")
    private String query;

    @NotNull(message = "文档列表不能为空")
    @Schema(description = "文档列表", example = "[\"apple\", \"banana\", \"fruit\", \"vegetable\"]")
    private List<String> documents;

    @NotNull(message = "返回结果数量不能为空")
    @Schema(description = "返回结果数量", example = "4")
    private int top_n;

    @NotNull(message = "是否返回文档不能为空")
    @Schema(description = "是否返回文档", example = "false")
    private boolean return_documents;

    @NotNull(message = "每个文档的最大块数不能为空")
    @Schema(description = "每个文档的最大块数", example = "1024")
    private int max_chunks_per_doc;

    @NotNull(message = "重叠令牌数不能为空")
    @Schema(description = "重叠令牌数", example = "80")
    private int overlap_tokens;
}